<?php


namespace app\middleware;

/**
 * 跨域中间件
 * Class AllowCrossDomain
 * @package app\middleware
 */
class AllowCrossDomain extends \think\middleware\AllowCrossDomain {
    protected $header = [
        'Access-Control-Allow-Credentials' => 'true',
        'Access-Control-Max-Age'           => 1800,
        'Access-Control-Allow-Methods'     => 'GET, POST, PATCH, PUT, DELETE, OPTIONS',
        'Access-Control-Allow-Headers'     => 'Authorization, Content-Type, If-Match, If-Modified-Since, If-None-Match, If-Unmodified-Since, X-CSRF-TOKEN, X-Requested-With, Refresh-Token',
    ];
}